﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ULog.Client.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            var serverUrl = "http://api.banmachewu.com/ULog";
            ULogClient client=new ULogClient(1,serverUrl);
            ULog.Dto.ActionLogRequest actionRequest=new ULog.Dto.ActionLogRequest()
            {
                RequestMethod = "",
                ClientIP="127.0.0.1",
                RequestUrl = "testAction",
                APPVersion = "testAction",
                PlatformID = 1,
                PlatformVersion = "testAction",
                UserID = 1,
                PostData = "testAction",
                UA = "testAction",
                Vendor = "testAction",
                Model = "testAction",
                Token = "testAction",
                ClientId = "testAction",
                Moble = "testAction",
                Imei = "testAction",
                Uuid = "testAction",
                CreatedDate = DateTime.Now,
            };
            client.Action(actionRequest);

            var errorLogRequest=new ULog.Dto.ErrorLogRequest()
            {
                RequestMethod = "",
                ClientIP = "127.0.0.1",
                RequestUrl = "testError",
                APPVersion = "testError",
                PlatformID = 1,
                PlatformVersion = "testError",
                UserID = 1,
                PostData = "testError",
                UA = "testError",
                Vendor = "testError",
                Model = "testError",
                Token = "testError",
                ClientId = "testError",
                Moble = "testError",
                Imei = "testError",
                Uuid = "testError",
                CreatedDate = DateTime.Now,

                ErrorSource = "testError",
                ErrorMessage = "testError",
                ErrorTrace = "testError"
            };
            client.Error(errorLogRequest);
           

            var bizLogRequest = new ULog.Dto.BizLogRequest()
            {
                PlatformID = 1,
                ModuleName = "test",
                MethodName = "",
                TargetID = "11111",
                OpContent = "111",
                OldDataValue = "oldDataValue",
                NewDataValue = "1111",
                OpUserID = 111,
                OpUserName = "opusername",
                ServerName = "servername",
                ClientIP = "clientIP",
                PageUrl = "pageurl",
                OrganizationID = 222,
                CreateDateTime = DateTime.Now
            };
            client.Operate(bizLogRequest);

            Console.Read();

        }
    }
}
